package com.ruoyi.common.core.utils;


import cn.hutool.core.util.IdUtil;

/**
 * @author 马兰友
 * @Date: 2023/10/13/15:12
 */
public class SnowUtil {
    private static long dataCenterId = 1;
    private static long workerId = 1;

    public static long getSnowflakeNextId(){
        return IdUtil.getSnowflake(dataCenterId, workerId).nextId();
    }

    public static String getSnowflakeNextIdStr(){
        return IdUtil.getSnowflake(dataCenterId, workerId).nextIdStr();
    }
}
